package hy.service;

import entity.UserAddress;
import service.UserService;

import java.util.Arrays;
import java.util.List;

//@Service(version = "1.0")
public class UserServiceImpl_old implements UserService {
    @Override
    public UserAddress getUserAddress(String userId) {
        System.out.println("进入bootProvider_old");
        try {
            Thread.sleep(0000);
        } catch (InterruptedException e) {}
        UserAddress u1=new UserAddress(1,"南京_boot","001","139");
        UserAddress u2=new UserAddress(2,"北京_boot","002","136");
        List<UserAddress> list= Arrays.asList(u1,u2);

        for(int i=0;i<list.size();i++){
            if(list.get(i).getUserId().equals(userId)){
                return list.get(i);
            }
        }
        return null;
    }
}